-- GENERATED SPELL FOR [Bloodscale Wavecaller] --


function spell0_20089(pUnit, Event) --@Water Bolt,n/a--
pUnit:FullCastSpellOnTarget(32011,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20089', 2500, 1)
end

function spell1_20089(pUnit, Event) --@Water Shield,Self--
pUnit:FullCastSpellOnTarget(34827,pUnit)
pUnit:RegisterEvent('Sorts_20089', 635, 1)
end

function Sorts_20089(pUnit, Event)
local choix_sorts_20089 = math.random(0, 1)
if choix_sorts_20089 == 0 then
pUnit:RegisterEvent('spell0_20089', 1, 1)
end
if choix_sorts_20089 == 1 then
pUnit:RegisterEvent('spell1_20089', 1, 1)
end
end

function mob20089_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20089', math.random(1500, 3000), 1)
end

function mob20089_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20089_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20089_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20089, 1, 'mob20089_Action')
RegisterUnitEvent(20089, 2, 'mob20089_Leave')
RegisterUnitEvent(20089, 3, 'mob20089_Kill')
RegisterUnitEvent(20089, 4, 'mob20089_Die')
